package com.cybertron.ironhide.spider.task;

import java.util.ArrayList;
import java.util.List;

import com.cybertron.ironhide.spider.domain.SeedUrl;
import com.cybertron.ironhide.spider.domain.TaskUrl;
import com.cybertron.ironhide.spider.fetcher.Page;
import com.cybertron.ironhide.spider.xml.Site;
import com.cybertron.ironhide.spider.xml.Target;

public class Task {

	public Task(SeedUrl seedUrl, String url, String sourceUrl,
			Boolean isSource, Site site, int sort) {
		super();
		this.seedUrl = seedUrl;
		this.url = url;
		this.sourceUrl = sourceUrl;
		this.site = site;
		this.sort = sort;
		this.isSource = isSource;
	}

	public SeedUrl seedUrl;

	public Site site;

	public Target target;

	public Page page;

	public double sort = 10;

	public String url;

	public String sourceUrl;// task.url的来源

	public Boolean isSource;

	public List<TaskUrl> digNewUrls = new ArrayList<TaskUrl>();

	public String toString() {
		return "Task [site=" + site.getName() + ", sort=" + sort + ", url="
				+ url + ", sourceUrl=" + sourceUrl + "]";
	}
}
